<style>
    .sale-info {
        padding-top: 15px;
    }

    .info-box-text {
        font-size: 18px;
        font-weight: 700;
    }

    .connect-phone {
        color: #777;
    }
</style>

<div class="info-box">
    <span class="info-box-icon bg-aqua"><i class="fa fa-phone-square"></i></span>
    <div class="info-box-content">
        <span class="info-box-text">专属业务负责人</span>
        <span class="info-box-number sale-info">
            <span class="connect-saler"></span>
            <small class="connect-phone">加载中~~~~</small>
        </span>
    </div>
</div>

<script>
    let data = sessionStorage.data;
    if (!data) {
        let url = 'http://oms.ailaite.com/api/miya3/get-connect-us-info';
        let order_id = {{ config('miya.oms_order_id') }};
        fetch(url, {
            method: "POST",
            headers: {'Content-Type': 'application/json'},
            body: JSON.stringify({order_id: order_id})
        }).then(res => res.json()).then(data => {
            $('.connect-saler').text(data.sale.name);
            $('.connect-phone').text(data.sale.phone);

            sessionStorage.data = JSON.stringify(data);
        })
    } else {
        data = JSON.parse(data);

        $('.connect-saler').text(data.sale.name);
        $('.connect-phone').text(data.sale.phone)
    }
</script>
